package com.hk.shop.model;

import java.io.Serializable;
import java.math.BigDecimal;

public class CartItem implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3986357190376194450L;
	
	private Product product; //����������Ʒ��Ϣ
	private int count;       //����ĳ����Ʒ����
	@SuppressWarnings("unused")
	private BigDecimal subtotal; //����ĳ����ƷС��
	
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public BigDecimal getSubtotal(){
		if(product.getShop_price()!=null){
			return new BigDecimal(this.getCount()).multiply(product.getShop_price());
		}
		return new BigDecimal(0);
	}
}
